﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CommonLib
{
    public class Entity
    {
        /// <summary>
        /// Sesión activa, o null
        /// </summary>
        protected EntitySession Session;

        public static T Get<T>(EntitySession session, int id) where T:Entity
        {
            T ent = session.Get<T>(id);
            ent.Session = session;
            return ent;
        }

    }
}
